﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using CommonLib.Pattern;
public class EPChainNodeNone : IChainNode
{
	protected override bool TryDeal(object o)
	{
		RoleCtrl role = o as RoleCtrl;
		role.SubManagerMove.StopMove();
		Debug.Log("EPChainNodeNone");
		return true;
	}

	protected virtual bool IsDangrous(UnityEngine.GameObject @object, Vector2 center, Vector2 size)
	{

		Collider2D[] collider2D = Physics2D.OverlapBoxAll(center, size, 0);
		if (collider2D.Length <= 1)
			return false;
		else
		{

			for (int i = 0; i < collider2D.Length; i++)
			{
				if (collider2D[i].gameObject.tag == "Player" && collider2D[i].gameObject != @object)
				{
					return true;
				}
			}
		}
		// Physics.OverlapBox(transform.position, size, Quaternion.identity)
		return false;
	}
}
